package com.ruoyi.web.controller.obs.util;

import com.alibaba.fastjson.JSONObject;
import org.json.XML;

public class Xml2Json {

    public static int PRETTY_PRINT_INDENT_FACTOR = 4;

    public static JSONObject xml2Json(String xml){
        org.json.JSONObject jsonObject =  XML.toJSONObject(xml);
        JSONObject object = JSONObject.parseObject(jsonObject.toString());
        return object;
    }
}
